package com.local.web.service;

import com.local.cart.pojo.ShoppingCart;
import com.local.common.util.PageResultUtil;
import com.local.common.util.ResultUtil;
import com.local.order.pojo.Order;
import com.local.order.pojo.OrdersRequestParam;
import com.local.user.pojo.User;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpSession;
import java.util.List;

public interface OrderService {

    /**
     * 生成订单
     * @param user
     * @param shoppingCartList
     * @param userCouponRecordId
     * @return
     */
    public String saveOrder(User user, List<ShoppingCart> shoppingCartList, Integer userCouponRecordId);


    public ResultUtil<Order> getOrderByOrderNo(String orderNo);

    /**
     * 前台用户订单列表页，支持翻页
     * @param requestParam
     * @return
     */
    public ResultUtil<PageResultUtil<Order>> orders(@RequestBody OrdersRequestParam requestParam);
}
